<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title></title>
		<meta http-equiv="pragma" content="no-cache">
        <meta http-equiv="cache-control" content="no-cache">
        <meta http-equiv="expires" content="0">
		<link rel="stylesheet" type="text/css" href="<c:url value="/static/jquery-easyui/themes/default/easyui.css"/>">
		<link rel="stylesheet" type="text/css"
			href="<c:url value="/static/jquery-easyui/themes/icon.css"/>">
		<script type="text/javascript"
			src="<c:url value="/static/jquery-easyui/jquery-1.6.min.js"/>"></script>
		<script type="text/javascript"
			src="<c:url value="/static/jquery-easyui/jquery.easyui.min.js"/>"></script>
		<script type="text/javascript"
			src="<c:url value="/static/jquery-easyui/plugins/jquery.panel.js"/>"></script>
		<script type="text/javascript"
			src="<c:url value="/static/jquery-easyui/plugins/jquery.datagrid.js"/>"></script>
		<script type="text/javascript"
			src="<c:url value="/static/jquery-easyui/plugins/jquery.messager.js"/>"></script>
		<script type="text/javascript"
			src="<c:url value="/static/jquery-easyui/ext-for-framework.js.jsp"/>"></script>
		<script type="text/javascript" src="<c:url value="/static/jquery-easyui/locale/easyui-lang-zh_CN.js"/>"></script>		
		<script type="text/javascript"
			src="<c:url value="/static/js/common.js"/>"></script>		
		<script>
		
			function excel(){
				$('#AddFoodForm').form('submit',
		 				{
		 					url:'<c:url value='/supplier/exportSupperExcel.do'/>', //查询提交路径
		 					onSubmit:function()//提交按钮相应函数
		 					{
		 						return $('#AddFoodForm').form('validate');
		 					},
		 					success:function(data){
		 						data = eval( "("+data+")" );
		 		       			if(data.success){
		 		       				$.messager.alert("提示", "提交成功！",'info', function(){
		 		       					window.close();
									});
		 	       				}else{
		 		       				$.messager.alert("提示", data.msg, 'warning');
		 	       				}
		 					},
		 					error:function(){
		 						$.messager.alert("错误", "系统错误，请联系管理员！", 'error');
		 						return;
		 					}
		 				});
			}
			$(function() {        
                // 下拉框选择控件，下拉框的内容是动态查询数据库信息  
                $('#supId').combobox({   
                        url:"<c:url value='/store/pulldownSupId.do?space=0'/>",   
                        editable:false, //不可编辑状态  
                        cache: false,  
                        panelHeight: '150',  
                        valueField:'supId',     
                        textField:'supName',  
                        required:true
                });      
          });
		</script>
			</head>
			<body>
			<table width="98%">
			<tr><td>
				<form id="AddFoodForm" name="AddFoodForm" method="post">
				<div style="height: auto; width:1180px;background: #fafafa; padding: 5px;" class="easyui-panel" title="送货报表导出" iconCls="icon-add" collapsible="true" minimizable="false" maximizable="false" closable="false">
			    <table cellpadding="5">
			      <tr>
			        <td>供货商</td>
                    <td>
                        <input class="easyui-combobox" name="supId" id="supId" editable="false" data-options="required:true"/> 
                    </td>
                  	<td>日期</td>
                    <td>
 			            <input class="easyui-datebox" name="orderDate" id="orderDate" editable="false" data-options="required:true"/> 
 			        </td>
 			        <td>
 			        	<a href="#" class="easyui-linkbutton" onclick="excel()">导出</a>
 			        </td>
                  </tr>
				        <input class="easyui-validatebox" type="hidden" name="idList"  />
				        <input class="easyui-validatebox" type="hidden" name="excelList"  />
				        <input class="easyui-validatebox" type="hidden" name="footList"  />
                </table>
                </div>
                </form>
            </td></tr>
            </table>
			<table width="98%">
			<tr>
		</table>
	</body>
</html>